home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / x25 / nrs.shar.Z / nrs.shar / make.com < prev    next >
Encoding:
Text File  |  1990-04-27  |  3.3 KB  |  142 lines

  1. $! RCSid[] = "@(#)$Header: make.com,v 3.1 86/12/22 14:01:25 pb Rel $"
  2. $!
  3. $! Where does the DERFIL reside ?
  4. $  NRSPROG   = "SYS$DISK:[]NRS.EXE"
  5. $  NRSUSER   = " "
  6. $  NRSPW     = ""
  7. $  STDCONF   = "STDCONF.COM"
  8. $  LOCALCONF = "LOCALCONF.COM"
  9. $
  10. $  @'STDCONF'
  11. $  @'LOCALCONF'
  12. $
  13. $  IF NRSUSER .EQS. " " THEN WRITE SYS$OUTPUT "Please set NRS user name and password in MAKE.COM"
  14. $  TMPNAME = "NRSTEMP.TMP;1"
  15. $!
  16. $! Called as ``@make op1 op2 op3 .....'' where
  17. $! CONFIGURE    Reconfigure the system (not defined yet)
  18. $! CC list    Compile the comma separator list of sources
  19. $! CCALL    == CC main,misc,...
  20. $! LINK        link together all the binaries into NRS.EXE
  21. $! COMPILE    == CCALL LINK
  22. $! GETFILES    Fetch the DERFIL1 file from the NRS
  23. $! CONVERT    Convert it into C format (seekable file)
  24. $! NRS        Use VMS.CF to generate NRS.OUT
  25. $!
  26. $! What to do if no arguments ?  ``@make configure'' zaps P1, P2 and P5.
  27. $  IF P1 .NES. "" THEN GOTO SOME_ARGS
  28. $  P1 = "CONFIGURE"    ! "CONFIGURE"
  29. $  P2 = "COMPILE"    ! "COMPILE"
  30. $  P3 = ""        ! "FETCH"
  31. $  P4 = ""        ! "CONVERT"
  32. $  P5 = ""        ! "NRS"
  33. $SOME_ARGS:
  34. $! Initialise the counter
  35. $  X=0
  36. $NEXT_ARG:
  37. $! Process the next argument
  38. $! Where to goto whhen finished processing ...
  39. $  RETURN_ADDR="NEXT_ARG"
  40. $  X=X+1
  41. $  Y=P'X'
  42. $  IF Y .NES. "" THEN GOTO 'Y'
  43. $! Nothing to do -- just loop
  44. $  IF X .LT. 8 THEN GOTO 'RETURN_ADDR'
  45. $  EXIT
  46. $!
  47. $COMPILE:
  48. $! compile == CCALL then LINK
  49. $  RETURN_ADDR="COMPILE2"
  50. $  GOTO CCALL
  51. $COMPILE2:
  52. $  RETURN_ADDR="NEXT_ARG"
  53. $  GOTO LINK
  54. $!
  55. $CONFIG:
  56. $CONFIGURE:
  57. $!
  58. $! Now tailor the special files
  59. $! generate an nrs.h
  60. $  @nrs.VMS
  61. $  @text.VMS
  62. $  @vms.VMS
  63. $!
  64. $! DEFINE SYS$OUTPUT/USER NIL:
  65. $  EDIT/NOJOURNAL make.com
  66. "CONFIGURE
  67.  
  68. "CONFIGURE
  69.  
  70. "CONFIGURE
  71. delete
  72. insert;$  P1 = ""        ! "CONFIGURE"
  73. "COMPILE
  74. delete
  75. insert;$  P2 = ""        ! "COMPILE"
  76. "NRS
  77. delete
  78. insert;$  P5 = "NRS"        ! "NRS"
  79. exit
  80. $  GOTO 'RETURN_ADDR'
  81. $!
  82. $CCALL:
  83. $! CC everything
  84. $  P'X'="config,defs,lru,main,misc,output"
  85. $  X=X-1
  86. $CC:
  87. $! Compile the next supplied argument.
  88. $  X=X+1
  89. $  Y=P'X'
  90. $  WRITE SYS$OUTPUT "compiling ''Y'  ...."
  91. $! make <sys/thing.h> map onto SYS$LIBRARY
  92. $  DEFINE SYS SYS$LIBRARY/USER_MODE
  93. $! Now compile it .....
  94. $  cc 'Y'
  95. $  GOTO 'RETURN_ADDR'
  96. $!
  97. $LINK:
  98. $! Now link it together
  99. $! Pick up
  100. $  WRITE SYS$OUTPUT "linking  ...."
  101. $  DEFINE LNK$LIBRARY SYS$LIBRARY:VAXCRTL/USER
  102. $  link   config,defs,lru,main,misc,output
  103. $  rename config.exe 'NRSPROG'
  104. $  GOTO 'RETURN_ADDR'
  105. $!
  106. $GETFILES:
  107. $! get.atomic - drag all the relevant files from the salford machine
  108. $!  there are quite a few, but most only have one or two lines.
  109. $!
  110. $!    If you have problems with salfords address, it is currently
  111. $!        000014901000/SPCP.FTP
  112. $!
  113. $! Ensure input from TT in case null USER/PW
  114. $  DEFINE SYS$INPUT TT
  115. $  TRANSFER nrs::"make.nrs>database>''dirsample'" 'datadir''dirsample' 'NRSUSER' 'NRSPW'
  116. $  GOTO 'RETURN_ADDR'
  117. $!
  118. $CONVERT:
  119. $! The derfil needs to be converted to be Stream
  120. $  DELETE 'TMPNAME'
  121. $  CREATE 'TMPNAME'
  122. FILE
  123.     BEST_TRY_CONTIGUOUS    no
  124.     CLUSTER_SIZE        1
  125.     CONTIGUOUS        no
  126.     ORGANIZATION        sequential
  127. RECORD
  128.     BLOCK_SPAN        yes
  129.     CARRIAGE_CONTROL    none
  130.     FORMAT            stream_LF
  131.     SIZE            0
  132. $  CONVERT/fdl='TMPNAME' 'datadir''dirsample' 'datadir''dirsample'
  133. $  DELETE 'TMPNAME'
  134. $  GOTO 'RETURN_ADDR'
  135. $!
  136. $NRS:
  137. $! Run it, sending output to NRS.OUT
  138. $  DEFINE SYS$OUTPUT/USER_MODE NRS.OUT
  139. $  NRSCOMMAND:=$'NRSPROG'
  140. $  NRSCOMMAND vms.cf
  141. $  GOTO 'RETURN_ADDR'
  142.